-
-
Notifications
You must be signed in to change notification settings - Fork 787
test: use single test files as jest entries #11755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the test structure for rspack-test to use single test files as jest entries, enabling concurrent test execution through Jest workers.
- Replaces legacy test runners with global helper functions for case definitions
- Converts test configuration from module.exports to function-based definitions
- Updates Jest configuration to match individual test files instead of suite-level runners
Reviewed Changes
Copilot reviewed 132 out of 132 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tests/rspack-test/jest.config.js | Updates test patterns to include individual case files and adds setup script |
packages/rspack-test-tools/src/setup.ts | Adds global helper functions for test case definition |
packages/rspack-test-tools/src/case/*.ts | Refactors case creators to use BasicCaseCreator pattern |
tests/rspack-test/Cases/.js | Converts from module.exports to defineXXXCase function calls |
tests/rspack-test/*.test.js | Removes legacy test suite files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ba00e2c
to
01a62d0
Compare
📦 Binary Size-limit
🙈 Size remains the same at 47.43MB |
CodSpeed Performance ReportMerging #11755 will not alter performanceComparing 🎉 Hooray!
|
"test:diff": "pnpm --filter \"@rspack/*\" test:diff", | ||
"test:hot": "pnpm --filter \"@rspack/*\" test:hot", | ||
"test:unit": "pnpm --parallel --filter \"@rspack/*\" test", | ||
"test:unit": "pnpm --sequential --filter \"@rspack/*\" test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use sequential to prevent OOM
target: aarch64-apple-darwin | ||
profile: "ci" | ||
runner: ${{ vars.MACOS_RUNNER_LABELS || '"macos-latest"' }} | ||
runner: ${{ vars.MAC_SELF_HOSTED_RUNNER_LABELS || '"macos-latest"' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use self hosted mac runner to prevent timeout
e2a21e4
to
60a7b12
Compare
Summary
Use single test files as jest entries, then these tests can run concurrently by jest workers
Related links
Checklist